export class StringUtil {
    static guid():string{
       let guid:string  = ""
       for (let i = 1; i <=32; i++) {
         /**
          * toString()方法，如果不传里面的数据
         */
        // let r = Math.floor(Math.random() * 16).toString()
        let r = Math.floor(Math.random() * 16).toString(16)
        guid += r
        if (i == 8 || i == 12 || i == 16 || i == 20) {
            guid += "-";
        }
        
       }
       return guid; 
    }
    /**
     * 是否是空字符串
     * @param value 
     * @returns boolean 
     */
    static isEmpty(value:string):boolean{
        return value==null || value == undefined || value.length==0;
    }
}